<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

Route::group([
	'namespace' => 'Api\v1',
	'prefix' => 'v1',
], function () {
	Route::any('/activity', 'ActivityController@index');
	Route::any('/shareCallBack', 'ActivityController@shareCallBack');
	Route::any('/shareClickBack', 'ActivityController@shareClickBack');
	Route::any('/activityinfo', 'ActivityController@detail');
	Route::any('/setAddress', 'ActivityController@setAddress');
	Route::get('/roles', 'RoleController@index');
	Route::get('/roles/business/{id}', 'RoleController@business');
	Route::post('/role', 'RoleController@store');

	//新增微信用户
	Route::post('/user', 'UserController@store');
	Route::post('/bindPhone', 'UserController@bindPhone');
	//分享活动界面
	Route::get('/share/{unique}/{openid}', 'ActivityController@share');
	Route::get('/lottery/{unique}/{openid}', 'ActivityController@lottery');
});